using System;
using System.Runtime.Serialization;
using System.Collections.Generic;

namespace CoreEx.Samples.DomainModel
{

	/// <summary>
	/// A class that represents Products.
	/// </summary>
	[Serializable]
	public class Product
	{
		#region Private Members

		private IList<OrderDetail> _orderDetails = new List<OrderDetail>();
		private IList<ProductSupplier> _productSuppliers = new List<ProductSupplier>();

		#endregion

		/// <summary>
		/// Gets or sets the Product ID
		/// </summary>
		public virtual int ProductID { get; set; }

		/// <summary>
		/// Gets or sets the Product Name
		/// </summary>
		public virtual string ProductName { get; set; }

		/// <summary>
		/// Gets or sets the Quantity Per Unit
		/// </summary>
		public virtual string QuantityPerUnit { get; set; }

		/// <summary>
		/// Gets or sets the Unit Price
		/// </summary>
		public virtual decimal? UnitPrice { get; set; }

		/// <summary>
		/// Gets or sets the Units In Stock
		/// </summary>
		public virtual short? UnitsInStock { get; set; }

		/// <summary>
		/// Gets or sets the Units On Order
		/// </summary>
		public virtual short? UnitsOnOrder { get; set; }

		/// <summary>
		/// Gets or sets the Reorder Level
		/// </summary>
		public virtual short? ReorderLevel { get; set; }

		/// <summary>
		/// Gets or sets the Discontinued
		/// </summary>
		public virtual bool Discontinued { get; set; }

		/// <summary>
		/// Gets the Order Details
		/// </summary>
		public IList<OrderDetail> OrderDetails 
		{
			get { return _orderDetails; }
		}

		/// <summary>
		/// Gets the Product Suppliers
		/// </summary>
		public IList<ProductSupplier> ProductSuppliers 
		{
			get { return _productSuppliers; }
		}

		/// <summary>
		/// Gets or sets the Category
		/// </summary>
		public virtual Category Category { get; set;}

		/// <summary>
		/// Gets or sets the Supplier
		/// </summary>
		public virtual Supplier Supplier { get; set;}
	}
}
